package com.cmy;

public class AnimalTest {
    public static void main(String[] args) {
        Animal a =new Animal("动物",3);
        a.eat();
        Animal a1 = new Cat("猫猫",5);
        a1.eat();
        System.out.println(a1.getName()+a1.getAge());

        Animal a2 = new Dog("狗狗",3);
        a2.eat();
        System.out.println(a2.getName()+a2.getAge());



    }

}
